import commonService from 'service/common'
export default {
    //解密用户手机号
    decryptMobile(data) {
        let dataObj = Object.assign({
            skeys: ''
        }, data)

        let paramsJson = {
            method: 'post',
            url: 'issue/customer/decrypt',
            data: dataObj
        }
        return commonService.syncAjax(paramsJson)

    },

    //修改用户密码
    async resetParentUserpassword(data) {
        let dataObj = Object.assign({
            "id": "",
            "skey": ""
        }, data)

        let paramsJson = {
            method: 'post',
            url: 'issue/customer/resetPassword',
            data: dataObj
        }
        return await commonService.asyncFetchData(paramsJson)
    },
    //登陆人 信息
    async getLoginUserInfo(data) {
        let dataObj = Object.assign({

        }, data)
        let paramsJson = {
            baseURL: '/webapiThird1',
            method: 'get',
            url: '/auth/userInfo',
            params: dataObj,
            headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'X-Requested-With': 'XMLHttpRequest' },
        }
        let jsondata = await commonService.asyncFetchData(paramsJson)
        return jsondata
    },
    //存储客户信息
    async saveCustomerInfo(data) {
        let paramsJson = {
            method: 'post',
            url: '/issue/customer',
            data: data
        }
        let jsondata = await commonService.asyncFetchData(paramsJson)
        return jsondata
    }
}